package com.lx.perferred.mall.admin.model;

import io.swagger.annotations.ApiModelProperty;
import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;

import java.util.Objects;

/**
 * @author lX
 * @version JDK 8
 * @className UmsAdminParam (此处以class为例)
 * @date 2024/11/30
 * @description 管理员用户参数
 */
public class UmsAdminParam {

  @ApiModelProperty(value = "用户名", required = true)
  @NotEmpty(message = "用户名不能为空")
  private String username;
  @ApiModelProperty(value = "密码", required = true)
  @NotEmpty(message = "密码不能为空")
  private String password;
  @ApiModelProperty(value = "用户头像")
  private String icon;
  @ApiModelProperty(value = "邮箱")
  @Email(message = "邮箱格式不合法")
  private String email;
  @ApiModelProperty(value = "用户昵称")
  private String nickName;
  @ApiModelProperty(value = "备注")
  private String note;

  public String getUsername() {
    return username;
  }

  public void setUsername(String username) {
    this.username = username;
  }

  public String getPassword() {
    return password;
  }

  public void setPassword(String password) {
    this.password = password;
  }

  public String getIcon() {
    return icon;
  }

  public void setIcon(String icon) {
    this.icon = icon;
  }

  public String getEmail() {
    return email;
  }

  public void setEmail(String email) {
    this.email = email;
  }

  public String getNickName() {
    return nickName;
  }

  public void setNickName(String nickName) {
    this.nickName = nickName;
  }

  public String getNote() {
    return note;
  }

  public void setNote(String note) {
    this.note = note;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;
    UmsAdminParam that = (UmsAdminParam) o;
    return Objects.equals(username, that.username) && Objects.equals(password, that.password) && Objects.equals(icon, that.icon) && Objects.equals(email, that.email) && Objects.equals(nickName, that.nickName) && Objects.equals(note, that.note);
  }

  @Override
  public int hashCode() {
    return Objects.hash(username, password, icon, email, nickName, note);
  }

  @Override
  public String toString() {
    return "UmsAdminParam{" +
      "username='" + username + '\'' +
      ", password='" + password + '\'' +
      ", icon='" + icon + '\'' +
      ", email='" + email + '\'' +
      ", nickName='" + nickName + '\'' +
      ", note='" + note + '\'' +
      '}';
  }
}
